<include file="Public:header" />
<link href="__PUBLIC__/css/litebox.css" rel="stylesheet" type="text/css">
<script src="__PUBLIC__/js/PCASClass.js" type="text/javascript"></script>
<script src="__PUBLIC__/js/docode.js" type="text/javascript"></script>
<!-- nice-scroll -->
<script src="__PUBLIC__/style/js/plugins/nice-scroll/jquery.nicescroll.min.js" type="text/javascript"></script>
<script type="text/javascript" src="__PUBLIC__/style/js/TableFreeze.js"></script>
<script src="__PUBLIC__/js/mxcrm_more.js" type="text/javascript"></script>
<!-- Select2 -->
<script src="__PUBLIC__/style/js/plugins/jsTree/jstree.min.js"></script>
<link href="__PUBLIC__/style/css/plugins/jsTree/style.min.css" rel="stylesheet">
<style>
    body{
        overflow-y: hidden;
    }
    .option{padding-left:-30px;}
    #oDivL_tab_Test3{background-color: #fff;}
    .status_ico{
        position: absolute;
        top: -46px;
        background: #FFF;
        border: 1px solid #AAA;
        border-radius: 5px;
        padding: 7px;
        width: 220px;
        display: inline-block;
        display: none;
        left: 50%;
        margin-left: -159px;
        z-index: 101;
    }
    .status_ico:before {
        content: "";
        width: 0;
        height: 0;
        border-left: 10px solid transparent;
        border-right: 10px solid transparent;
        border-top: 10px solid #AAA;
        position: absolute;
        bottom: -10px;
        left: 100px;
    }
    .status_ico:after{
        content: "";
        width: 0;
        height: 0;
        border-left: 9px solid transparent;
        border-right: 9px solid transparent;
        border-top: 9px solid #FFF;
        position: absolute;
        bottom: -9px;
        left: 101px;
    }
    .LocalDataUIB{
        margin-left: -4px;
    }
    .LocalDataUIB-input{
        left: 5px;
    }
    .newtb>tbody > tr >td{
        text-align: center;
        color: #ffffff;
        font-size: 18px;
        height: 45px;
    }
    .newtb{
        background-color: #1c84c6;
    }
</style>
<script>
    $(function(){
        var scroll_width = 10;
        $("#table_div").height(window.innerHeight-$("#table_div").offset().top-$("#tfoot_div").height()-parseInt($("#table_container").css("padding-bottom").replace("px",""))-10);
        $(window).resize(function(){
            $("#table_div").height(window.innerHeight-$("#table_div").offset().top-$("#tfoot_div").height()-parseInt($("#table_container").css("padding-bottom").replace("px",""))-10);
            $("#oDivL_tab_Test3").height($("#table_div").height()-1).width($("#oTableLH_tab_Test3").width());
            $("#oDivH_tab_Test3").height($("#oTableLH_tab_Test3").height()).width($("#table_div").width());
        })
        $(".nicescroll").niceScroll({
            cursorcolor: "#999",//#CC0071 光标颜色
            cursoropacitymax: 0.4, //改变不透明度非常光标处于活动状态（scrollabar“可见”状态），范围从1到0
            touchbehavior: false, //使光标拖动滚动像在台式电脑触摸设备
            cursorwidth: scroll_width+"px", //像素光标的宽度
            cursorborder: "0", //     游标边框css定义
            cursorborderradius: "3px",//以像素为光标边界半径
            autohidemode: false, //是否隐藏滚动条
            zindex:100,
            background:"#F3F3F5",//滚动条背景色
        });
        $("#tab_Test3").FrozenTable(1,0,3);
        $("#oDivL_tab_Test3").height($("#table_div").height()-scroll_width-1).width($("#oTableLH_tab_Test3").width()).css({'zIndex':9});
        $("#oDivL_tab_Test3").css({"background-color":"#fff","border-right":"1px solid #e7eaec"});
        $("#oTableLH_tab_Test3").css({"border-right":"1px solid #e7eaec"});
        $("#oDivH_tab_Test3").height($("#oTableLH_tab_Test3").height()).width($("#table_div").width()-scroll_width).css({'zIndex':9});

        $("#left_list").height(window.innerHeight-$("#left_list").offset().top-30);
        $(window).resize(function(){
            $("#left_list").height(window.innerHeight-$("#left_list").offset().top-30);
        })
    });
    $(document).ready(function () {
        $("#short_search").off().on(function () {
            console.log(1);
        });
    })
</script>
<div style="display:none" id="dialog-log" title="加入项目">
    <div class="spiner-example">
        <div class="sk-spinner sk-spinner-three-bounce">
            <div class="sk-bounce1"></div>
            <div class="sk-bounce2"></div>
            <div class="sk-bounce3"></div>
        </div>
    </div>
</div>
<div class="wrapper wrapper-content">
    <include file="Public:alert" />
    <div class="row">
        <div class="col-md-12">
            <div class="ibox float-e-margins">
                <div class="title-bar" style="position: relative;z-index: 99;">
                    <div class="row  clearfix" id="title-hide" style="display:none;">
                        <ul class="breadcrum pull-left">
                            <li>已选中&nbsp;<span id="icheck_num"></span>&nbsp;项</li>
                            <!--<if condition="$Think.get.by neq 'deleted'">
                                <li class="single_btn"><a href="javascript:void(0)" id="edit_product"><i class="fa fa-pencil"></i>&nbsp;编辑</a></li>
                            </if>

                            <if condition="$Think.get.by eq 'deleted'">
                                <li class="single_btn"><a href="javascript:void(0)" id="unfavorite"><i class="fa fa-star-o"></i>&nbsp;取消收藏</a></li>
                                <else />
                                <li class="single_btn">
                                    <span id="to_product"><a href="javascript:void(0)" id="favorite"><i class="fa fa-star-o"></i>&nbsp;收藏</a></span>
                                </li>
                            </if>-->
                            <li>
                                <span><a href="javascript:void(0);" class="link excelExport"><i class="fa fa-download"></i>&nbsp;导出</a></span>
                            </li>
                            <li>
                                <span><a id="delete" href="javascript:void(0);" class="link"><i class="fa fa-times"></i>&nbsp;删除</a></span>
                            </li>
                            <li class="last_li"><big><a class="fa fa-times pull-right" id="back-show"></a></big></li>
                        </ul>
                    </div>
                    <div class="row " id="title-show">
                        <ul class="nav pull-left" style="margin:2px 0 0 15px;">
                            <a href="{:U('background/add')}" class="btn btn-primary btn-sm pull-left" style="margin-right:8px"><i class="fa fa-plus-circle"></i>&nbsp; 新增员工</a>
                            <a href="{:U('background/add_more')}" class="btn btn-primary btn-sm pull-left" style="margin-right:8px"><i class="fa fa-plus-circle"></i>&nbsp; 批量导入员工</a>
                        </ul>
                        <form class="form-inline" id="" action="" autocomplete="off" method="get">
                            <ul class="breadcrum pull-right" style="margin-bottom: 0px">
                                <li>
                                    搜索：
                                    <div class="input-group">
                                        <input type="hidden" name="m" value="background"/>
                                        <input type="hidden" name="a" value="index"/>
                                        <input id="s-type" type="hidden" name="type" value="{$type}">
                                        <!-- <input type="hidden" name="field" value="name"/>
                                         <input type="hidden" name="condition" value="contains"/>-->
                                        <if condition = "$type eq 'all'">
                                            <input type="text" style="width:160px;" placeholder="请输入人才姓名"  class="form-control short_search " name="search" value="{$search}" data-type="all" />
                                            <elseif condition="$type eq 'company'"/><input type="text" style="width:160px;" placeholder="请输入公司名称"  class="form-control short_search " name="search" value="" data-type="all" />
                                            <elseif condition="$type eq 'industry'"/><input type="text" style="width:160px;" placeholder="请输入行业名称"  class="form-control short_search " name="search" value="" data-type="all" />
                                            <elseif condition="$type eq ''"/><input type="text" style="width:160px;" placeholder="请输入行业名称"  class="form-control short_search " name="search" value="" data-type="all" />
                                            <elseif condition="$type eq 'time'"/><input type="text" style="width:160px;height: 32px;" placeholder="请选择时间"  class="form-control short_search " name="search" value="" data-type="all" onFocus="WdatePicker({dateFmt:&quot;yyyy-MM-dd &quot;,maxDate:&quot;%y-%M-%d&quot;})" readonly="readonly" />
                                        </if>
                                        <span class="input-group-btn">
										    <button class="btn btn-default btn-search" type="submit"><i class="fa fa-search"></i></button>
									    </span>
                                    </div>
                                </li>&nbsp;&nbsp;

                            </ul>
                        </form>
                        <ul class="breadcrum pull-right" style="margin-bottom: 0px">
                            <li>
                                <div class="input-group">
                                    <select class="form-control" onchange="searchtype(this)" style="margin-bottom:5px;">
                                        <option value="all" <if condition = "$type eq 'all'">selected="selected"</if>>全部员工</option>
                                        <option value="time" <if condition = "$type eq 'time'">selected="selected"</if>>录入时间</option>
                                        <option value="company" <if condition = "$type eq 'company'">selected="selected"</if>>公司名称</option>
                                        <option value="industry" <if condition = "$type eq 'industry'">selected="selected"</if>>所属行业
                                    </select>
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="row" style="margin: 0;">
                    <div class="pull-left" style="width:16.222%;color: #000;display: none;">
                        <div class="ibox-title clearfix" style="padding-top: 4px;">
                            <div class="detail-title clearfix">
                                <div class="pull-left all-inline">
                                    <a href="{:U('product/index')}">
                                        <span class="fa fa-inbox" style="font-size:18px;color:#667B8F"></span>&nbsp;
                                        <span style="color:#667B8F">全部人才</span>
                                    </a>
                                </div>
                            </div>
                        </div>
                        <div class="ibox-content" style="min-height: 300px;border-top: none;">
                            <div id="left_list" class="full-height-scroll">
                                <div id="knowledge-tree" >
                                    {$tree_code}
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="pull-right" style="width:100%">
                        <div class="ibox-content clearfix" id="table_container" style="z-index: 1;">
                            <form id="form1" action="" method="Post" style="position:relative;">
                                <div id="table_div" class="nicescroll">
                                <table class="table table-hover table-striped table_thead_fixed" id="tab_Test3">
                                    <if condition="$data eq null">
                                        <div style="background-color:#fff;"><include file="Public:nodata" /></div>
                                     <else/>
                                        <tr id="childNodes_num" class="tabTh">
                                            <td style="max-width: 60px;width:74px;padding:0 10px 0 7px;">
                                                <div class="checkbox checkbox-primary">
                                                    <input type="checkbox" class="check_all"/>
                                                    <label for=""></label>
                                                </div>
                                            </td>
                                            <!--<td style="display: none">id</td>-->
                                            <td>姓名</td>
                                            <td>事业部</td>
                                            <td>学校</td>
                                            <td>专业</td>
                                            <td>学历</td>
                                            <td>录入时间</td>
                                            <td>背调信息数</td>
                                            <td>行业</td>
                                            <td>操作</td>
                                        </tr>
                                        <tbody>
                                            <volist name="data" id="val" key="k">
                                                <tr class="controls_tr">
                                                    <td>
                                                        <div class="checkbox checkbox-primary">
                                                            <input name="product_id[]" class="check_list" type="checkbox" value="{$val['Id']}" <if condition="$vo['is_deleted'] eq '0'">rel1="0"<else/>rel1="1"</if>/>
                                                            <label for=""></label>
                                                        </div>
                                                    </td>
                                                    <td><span>{$val['s_name']}</span></td>
                                                    <td><span>{$val['department']}</span></td>
                                                    <td><span>{$val['school']}</span></td>
                                                    <td><span>{$val['major']}</span></td>
                                                    <td><span>{$val['education']}</span></td>
                                                    <td><span>{$val['date']|date='Y-m-d',###}</span></td>
                                                    <td class="bdcount"><span>{$val['msg_id']|count}</span></td>
                                                    <td><span>{$val['industry']}</span></td>
                                                    <td>
                                                        <span class="label label-primary editstatus openbg" style="cursor: pointer" data-id="{$val['Id']}">查看 </span>
                                                        <span class="label label-primary editstatus bgedit" style="cursor: pointer;margin-left: 10px" data-id="{$val['Id']}">修改 </span>
                                                        <span class="label label-danger editstatus bgdelete" style="cursor: pointer;margin-left: 10px" data-id="{$val['Id']}">删除 </span>
                                                    </td>
                                                </tr>
                                            </volist>
                                        <tbody>
                                    </if>
                                </table>
                                </div>
                                <div id="tfoot_div" class="clearfix">
                                    <div class="clearfix" id="tfoot_page">
                                        <if condition="$fields_search || $_GET['field']">
                                            <span class="pull-left" style="margin-left:25px;margin-top:10px;">本次搜索结果<span style="color:#F8AC59"> {$count} </span>条数据<a href="{:U('product/index')}" class="btn" style="background:#fff;border:1px solid #ccc;margin-left:10px;color:#999;" id="clearnumber">清除搜索条件</a></span>
                                        </if>
                                        {$page}<include file="Public:listrows" />
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    function timestampToTime(timestamp) {
        var date = new Date(timestamp * 1000);//时间戳为10位需*1000，时间戳为13位的话不需乘1000
        var Y = date.getFullYear() + '-';
        var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-';
        var D = date.getDate() + ' ';
        var h = date.getHours() + ':';
        var m = date.getMinutes() + ':';
        var s = date.getSeconds();
        return Y+M+D+h+m+s;
    }
    timestampToTime(1403058804);
    function shouqi(data) {
        var count = $(data).parent().parent().children(".bdcount").children("span").text();
        var tr = $(data).parent().parent();
        for(let i=0;i<count;i++){
            tr.next().remove();
        }
        $(data).prev().css('display','inline');
        $(data).remove();
    }
    $(document).ready(function () {
        $(".openbg").on("click",function () {
            var id = {"s_id":$(this).attr('data-id')};
            var obj = $(this);
            $.ajax({
                url:"/index.php?m=background&a=bdopen",
                type:"post",
                async:true,
                data:id,
                dataType:"json",
                success:function (database) {
                    if(!database){alert_crm('该员工还没有背调信息！')}
                    else{
                        for(let i = 0;i<database.length;i++){
                            var html='<tr class="controls_tr"><td colspan="10"><table class="newtb" cellpadding="10" cellspacing="10" style="width: 100%"><tr><td colspan="4" style="text-align: center">背调'+(i+1)+'</td></tr><tr><td>公司名: <span>'+database[i]['company_name']+'</span></td><td>入职时间：<span>'+database[i]['enter_time']+'</span></td><td>离职时间：<span>'+database[i]['out_time']+'</span></td><td>职位：<span>'+database[i]['position']+'</span></td></tr><tr><td>证明人：<span>'+database[i]['witness']+'</span></td><td>与证明人：<span>'+database[i]['witness_add']+'</span></td><td>联系电话：<span>'+database[i]['tel']+'</span></td><td>联系地址：<span>'+database[i]['adress']+'</span></td></tr><tr><td>薪资：<span>'+database[i]['salary']+'</span></td><td>工作表现：<span>'+database[i]['work_performance']+'</span></td><td>优缺点：<span>'+database[i]['bz']+'</span></td><td>离职原因：<span>'+database[i]['reasons']+'</span></td></tr><tr><td colspan="4">健康状况和不良记录：<span>'+database[i]['health']+'</span></td></tr></table></td></tr>';
                            obj.parent().parent().after(html);
                            /*if(i%2==0){
                             var html='<tr class="controls_tr bgtbs"><td colspan="10"><table class="newtb" cellpadding="10" cellspacing="10" style="width: 100%"><tr><td colspan="4" style="text-align: center">背调'+i+'</td></tr><tr><td>公司名: <span>'+database[i]['company_name']+'</span></td><td>入职时间：<span>2018-8</span></td><td>离职时间：<span>2018-9</span></td><td>职位：<span>提莫</span></td></tr><tr><td>证明人：<span>职位</span></td><td>与证明人：<span>关系</span></td><td>联系电话：<span>职位</span></td><td>联系地址：<span>职位</span></td></tr><tr><td>薪资：<span>123</span></td><td>工作表现：<span>职位</span></td><td>优缺点：<span>职位</span></td><td>离职原因：<span>关系</span></td></tr><tr><td colspan="4">健康状况和不良记录：<span>职位</span></td></tr></table></td></tr>';
                             $(this).parent().parent().after(html);
                             }else{
                             var html='<tr class="controls_tr bgtbs"><td colspan="10"><table class="newtb" cellpadding="10" cellspacing="10" style="width: 100%"><tr><td colspan="4" style="text-align: center">背调'+i+'</td></tr><tr><td>公司名: <span>'+database[i]['company_name']+'</span></td><td>入职时间：<span>2018-8</span></td><td>离职时间：<span>2018-9</span></td><td>职位：<span>提莫</span></td></tr><tr><td>证明人：<span>职位</span></td><td>与证明人：<span>关系</span></td><td>联系电话：<span>职位</span></td><td>联系地址：<span>职位</span></td></tr><tr><td>薪资：<span>123</span></td><td>工作表现：<span>职位</span></td><td>优缺点：<span>职位</span></td><td>离职原因：<span>关系</span></td></tr><tr><td colspan="4">健康状况和不良记录：<span>职位</span></td></tr></table></td></tr>';
                             $(this).parent().parent().after(html);
                             }*/
                        }
                        obj.after('<span class="label label-primary editstatus" style="cursor: pointer;margin-left: 10px" onclick="shouqi(this)">收起 </span>');
                        obj.css('display','none');
                    }
                },
                error:function (error) {
                    //alert_crm(error)
                }
            })
        });
        $(".bgdelete").on("click",function () {
            var id = $(this).attr("data-id");
            id = {"id":id,"type":"all"};
            swal({
                    title: "您确定要删除员工信息吗？",
                    text: "删除后将无法恢复，请谨慎操作！",
                    type: "warning",
                    showCancelButton: true,
                    confirmButtonColor: "#DD6B55",
                    confirmButtonText: "是的，我要删除！",
                    cancelButtonText:'让我再考虑一下…',
                    closeOnConfirm:false,
                    closeOnCancel:false
                },
                function(isConfirm){
                    if (isConfirm) {
                        $.ajax({
                            url:"/index.php?m=background&a=delete",
                            type:"post",
                            async:true,
                            data:id,
                            success: function (data) {
                                if (data.status == 1) {
                                    swal({
                                        title:'删除成功',
                                        text:'您已经永久删除该条信息！',
                                        type:"success",
                                        confirmButtonText: "确定"
                                    },function (isConfirm) {
                                        if(isConfirm){
                                            location.reload();
                                        }
                                    });
                                } else {
                                    swal({
                                        title: "操作失败！",
                                        text:data.info,
                                        type: "error"
                                    })
                                    return false;
                                }
                            },
                            dataType: 'json'
                        });
                    } else {
                        swal("已取消","您取消了删除操作！","error");
                    }
                });
        });
    });
    $(".bgedit").on("click",function () {
        var id = $(this).attr("data-id");
        id = parseInt(id);
        window.location.href="/index.php?m=background&a=edit&id="+id;
    });
    $('#delete').click(function(){
        var id_array = new Array();
        $("input.check_list:checked").each(function(){
            id_array.push($(this).val());
        });
        if(id_array.length == 0){
            alert_crm('{:L('YOU_HAVE_NOT_CHOSEN_ANY_CUSTOMERS')}');
            return false;
        }
        swal({
                title: "您确定要删除员工信息吗？",
                text: "删除后将无法恢复，请谨慎操作！",
                type: "warning",
                showCancelButton: true,
                confirmButtonColor: "#DD6B55",
                confirmButtonText: "是的，我要删除！",
                cancelButtonText:'让我再考虑一下…',
                closeOnConfirm:false,
                closeOnCancel:false
            },
            function(isConfirm){
                if (isConfirm) {
                    $.ajax({
                        type:'post',
                        url: "{:U('background/deleteall')}",
                        data: {customer_id: id_array},
                        async: false,
                        success: function (data) {
                            if (data.status == 1) {
                                swal({
                                    title:'删除成功',
                                    text:'您已经永久删除该条信息！',
                                    type:"success",
                                    confirmButtonText: "确定"
                                },function (isConfirm) {
                                    if(isConfirm){
                                        location.reload();
                                    }
                                });
                            } else {
                                swal({
                                    title: "操作失败！",
                                    text:data.info,
                                    type: "error"
                                })
                                return false;
                            }
                        },
                        dataType: 'json'
                    });
                } else {
                    swal("已取消","您取消了删除操作！","error");
                }
            });
    })
</script>
<div style="display:none" id="dialog-field-search" title="高级搜索">
    <form class="form-inline" id="searchForm" action="" method="get">
        <div id="search_add" style="width:550px;float:left;">
            <empty name="fields_search">
                <div id="con_search_1" style="float:left;width:650px;margin:0 10px 0 10px;">
                    <ul class="nav pull-left" style="margin:0px 0 0 23px;width:650px">
                        <li class="pull-left">
                            <select id="field_1" style="width:auto" class="form-control input-sm field_name new-select" onchange="changeCondition(1)" >
                                <option class="" value="name">--请选择筛选条件--</option>
                                <volist name="field_list" id="v">
                                    <if condition = "$v['form_type'] eq 'p_box' && $v['field'] eq 'category_id'">
                                        <option class="product_category" value="{$v[field]}" rel="product" >{$v[name]}</option>
                                        <else />
                                        <option class="{$v['form_type']}" value="{$v[field]}" rel="product" <if condition = "$_GET['field'] eq '' && $v['field'] eq 'name'">selected="selected"</if>>{$v[name]}</option>
                                    </if>
                                </volist>
                                <option class="role" value="creater_role_id" <if condition = "$vo['field'] eq 'creater_role_id'">selected="selected"</if>>创建者</option>
                                <option class="date" value="create_time">{:L('CREATION_TIME')}</option>
                                <option class="date" value="update_time">{:L('MODIFICATION_TIME')}</option>
                            </select>&nbsp;&nbsp;
                        </li>
                        <li class="pull-left" id="conditionContent_1">
                            <select id="condition_1" style="width:auto" class="form-control input-sm new-select" onchange="changeSearch()" name="name[condition]">
                                <option value="contains">{:L('INCLUDE')}</option>
                                <option value="not_contain">不包括</option>
                                <option value="is">{:L('YES')}</option>
                                <option value="isnot">{:L('ISNOT')}</option>
                                <option value="start_with">{:L('BEGINNING_CHARACTER')}</option>
                                <option value="end_with">{:L('TERMINATION_CHARACTER')}</option>
                                <option value="is_empty">{:L('Mandatory')}</option>
                                <option value="is_not_empty">不为空</option>
                            </select>&nbsp;&nbsp;
                        </li>
                        <li class="pull-left" id="searchContent_1">
                            <input id="search_1" type="text" style="width:160px;" class="input-medium form-control input-sm search-query" name="name[value]"/>&nbsp;&nbsp;
                        </li>
                    </ul>
                </div>
                <?php $max_key = 1;?>
                <else />
                <volist name="fields_search" key="key1" id="vo">
                    <div id="con_search_{$key1}" style="float:left;width:650px;margin:10px 10px 0 10px;">
                        <div id="rem_{$key1}" class="pull-left" style="line-height:30px;"><a href="javascript:void(0);" class="rem_search" rel="{$key1}" title="移除"><span class="fa fa fa-times-circle"></span></a></div>
                        <ul class="nav pull-left" style="margin:0px 0 0 5px;width:620px;">
                            <li class="pull-left">
                                <select id="field_{$key1}" style="width:160px;" class="form-control input-sm field_name new-select" onchange="changeCondition({$key1})" >
                                    <option class="" value="name">--请选择筛选条件--</option>
                                    <volist name="field_list" id="v">
                                        <if condition = "$v['form_type'] eq 'p_box' && $v['field'] eq 'category_id'">
                                            <option class="product_category" value="{$v[field]}" rel="product" selected="selected" >{$v[name]}</option>
                                            <else />
                                            <option class="{$v['form_type']}" value="{$v['field']}" rel="product" <if condition = "$vo['field'] eq $v['field']">selected="selected"</if>>{$v[name]}
                                            </option>
                                        </if>
                                    </volist>
                                    <option class="role" value="creater_role_id" <if condition = "$vo['field'] eq 'creater_role_id'">selected="selected"</if> >创建者</option>
                                    <option class="date" value="create_time" <if condition = "$vo['field'] eq 'create_time'">selected="selected"</if>>{:L('CREATION_TIME')}</option>
                                    <option class="date" value="update_time" <if condition = "$vo['field'] eq 'update_time'">selected="selected"</if>>{:L('MODIFICATION_TIME')}</option>
                                </select>&nbsp;&nbsp;
                            </li>
                            <li class="pull-left" id="conditionContent_{$key1}">
                                <if condition="$vo.form_type eq 'number'">
                                    <select id="condition" style="width:100px;" class="form-control input-sm" name="{$vo['field']}[condition]">
                                        <option value="gt" <if condition="$_GET[$vo['field']][condition] eq 'gt'">selected="selected"</if>>{:L('GT')}</option>
                                        <option value="lt" <if condition="$_GET[$vo['field']][condition] eq 'lt'">selected="selected"</if>>{:L('LT')}</option>
                                        <option value="eq" <if condition="$_GET[$vo['field']][condition] eq 'eq'">selected="selected"</if>>{:L('EQ')}</option>
                                        <option value="neq" <if condition="$_GET[$vo['field']][condition] eq 'neq'">selected="selected"</if>>{:L('NEQ')}</option>
                                    </select>
                                    <elseif condition="$vo.form_type eq 'datetime'"/>
                                    <elseif condition="$vo.field eq 'creater_role_id' || $vo.form_type eq 'datetime'"/>
                                    <elseif condition="$vo.form_type eq 'box'" />
                                    <span id="{$vo['field']}">{$vo.value}</span>
                                    <script type="text/javascript">
                                        var b = '{$vo[field]}';
                                        var c = 'customer';
                                        var value_str = $("#{$vo['field']}").html();
                                        $.ajax({
                                            type:'get',
                                            url:'index.php?m=setting&a=boxfield&model='+c+'&field='+b,
                                            async:false,
                                            success:function(data){
                                                options = '';
                                                $.each(data.data, function(k, v){
                                                    if(value_str == v){
                                                        select = 'selected';
                                                    }else{
                                                        select = '';
                                                    }
                                                    options += "<option value='"+v+"' "+select+">"+v+"</option>";
                                                });
                                                $("#{$vo['field']}").html('<select class="{$vo["field"]} form-control input-sm" style="width:auto" name="{$vo["field"]}[value]" ><option value="">--请选择--</option>' + options + '</select>&nbsp;&nbsp;');
                                            },
                                            dataType:'json'
                                        });
                                    </script>
                                    <elseif condition="$vo.form_type eq 'address'" />
                                    <select id="condition" style="width:auto;margin-top: 13px;" class="form-control input-sm" name="{$vo['field']}[condition]">
                                        <option value="contains" <if condition="$_GET[$vo['field']][condition] eq 'contains'">selected="selected"</if>>{:L('IN')}</option>
                                        <option value="not_contain" <if condition="$_GET[$vo['field']][condition] eq 'not_contains'">selected="selected"</if>>{:L('NOTIN')}</option>
                                    </select>
                                    <select name="{$vo['field']}[state]" class="form-control input-sm" id="state" style="width:135px;margin-top: 13px;"></select>
                                    <select name="{$vo['field']}[city]" class="form-control input-sm" id="city" style="width:110px;margin-top: 13px;"></select>
                                    <select name="{$vo['field']}[area]" class="form-control input-sm" id="area" style="width:110px;margin-top: 13px;"></select>
                                    <input type="text" id="search" name="{$vo['field']}[search]" value="{$_GET[$vo['field']][search]}" class="form-control input-sm" style="margin-top: 13px;" placeholder="{:L('THE_STREET_INFORMATION')}" class="input-large">
                                    <script type="text/javascript">
                                        new PCAS("{$vo['field']}[state]","{$vo['field']}[city]","{$vo['field']}[area]","<php>echo $_GET[$vo['field']]['state'];</php>","<php>echo $_GET[$vo['field']]['city'];</php>","<php>echo $_GET[$vo['field']]['area'];</php>");
                                    </script>
                                    <else />
                                    <select id="condition" style="width:auto" class="form-control input-sm" name="{$vo['field']}[condition]">
                                        <option value="contains" <if condition="$_GET[$vo['field']][condition] eq 'contains'">selected="selected"</if>>{:L('INCLUDE')}</option>
                                        <option value="not_contain" <if condition="$_GET[$vo['field']][condition] eq 'not_contain'">selected="selected"</if>>{:L('EXCLUSIVE')}</option>
                                        <option value="is" <if condition="$_GET[$vo['field']][condition] eq 'is'">selected="selected"</if>>{:L('YES')}</option>
                                        <option value="isnot" <if condition="$_GET[$vo['field']][condition] eq 'isnot'">selected="selected"</if>>{:L('NO')}</option>
                                        <option value="start_with" <if condition="$_GET[$vo['field']][condition] eq 'start_with'">selected="selected"</if>>{:L('BEGINNING_CHARACTER')}</option>
                                        <option value="end_with" <if condition="$_GET[$vo['field']][condition] eq 'end_with'">selected="selected"</if>>{:L('TERMINATION_CHARACTER')}</option>
                                        <option value="is_empty" <if condition="$_GET[$vo['field']][condition] eq 'is_empty'">selected="selected"</if>>{:L('MANDATORY')}</option>
                                        <option value="is_not_empty" <if condition="$_GET[$vo['field']][condition] eq 'is_not_empty'">selected="selected"</if>>{:L('ISNOTEMPTY')}</option>
                                    </select>
                                </if>
                            </li>
                            <li class="pull-left" id="searchContent_{$key1}" style="margin-left:5px;">
                                <if condition="$vo.form_type neq 'box' && $vo.form_type neq 'address'">
                                    <if condition="$vo.form_type eq 'datetime'">
                                        <input id="start_{$vo['field']}" type="text" class="form-control input-sm search-query" name="{$vo['field']}[start]" onclick="WdatePicker()" value="{$fields_search[$vo['field']][start]}" rel="product"/> 至 <input id="end_{$vo['field']}" type="text" class="form-control input-sm search-query" name="{$vo['field']}[end]" onclick="WdatePicker()" value="{$fields_search[$vo['field']][end]}" rel="product"/>
                                        <elseif condition="$vo['field'] eq 'owner_role_id'"/>
                                        <span id="owner_role_search" rel="{$key1}" rel1="{$vo['field']}[value]" rel2="{$_GET[$vo['field']][value]}"/>
                                        <script type="text/javascript">
                                            var key_id = $('#owner_role_search').attr('rel');
                                            var search_owner_role_id = $('#owner_role_search').attr('rel1');
                                            var owner_roleid = $('#owner_role_search').attr('rel2');
                                            $.ajax({
                                                type:'get',
                                                url:'index.php?m=user&a=getrolelist&module=product&action=index',
                                                async:false,
                                                success:function(data){
                                                    options = '';
                                                    $.each(data.data, function(k, v){
                                                        options += '<option value="'+v.role_id+'" checkedit>'+v.user_name+' ['+v.department_name+'-'+v.role_name+'] </option>';
                                                    });
                                                    $("#searchContent_"+key_id+"").html('<select class="selectpicker show-tick form-control input-sm" data-live-search="true" id="search_'+key_id+'" name="'+search_owner_role_id+'" style="width:auto">' + options + '</select>');
                                                    var owner_roleid = "{$_GET[$vo['field']][value]}";
                                                    $('#search_'+key_id+' option[value='+owner_roleid +']').prop('selected',true);

                                                },
                                                dataType:'json'
                                            });
                                        </script>
                                        <elseif condition="$vo.form_type eq 'p_box' && $vo['field'] eq 'category_id'" />
                                        <span id="pro_category_id" rel="{$key1}" rel1="{$vo['field']}[value]" rel2="{$_GET[$vo['field']][value]}"/>
                                        <script type="text/javascript">
                                            var key_id = $('#pro_category_id').attr('rel');
                                            var search = $('#pro_category_id').attr('rel1');
                                            var search_categoryid = $('#pro_category_id').attr('rel2');
                                            $.ajax({
                                                type:'get',
                                                url:'index.php?m=product&a=categorylist',
                                                async:false,
                                                success:function(data){
                                                    options = '';
                                                    $.each(data.data, function(k, v){
                                                        select = '';
                                                        if(v.category_id == search_categoryid){
                                                            select = 'selected';
                                                        }
                                                        options += '<option value="'+v.category_id+'" '+select+'>'+v.name+'</option>';
                                                    });
                                                    $("#searchContent_"+key_id+"").html('<select class="form-control input-sm" id="search_'+key_id+'" style="width:auto" name="'+search+'">' + options + '</select>');
                                                    if(data.info == 'checkbox'){
                                                        $("#conditionContent_"+key_id+"").html('<input type="hidden"  value="contains">');
                                                    }else{
                                                        $("#conditionContent_"+key_id+"").html('');
                                                    }
                                                },
                                                dataType:'json'
                                            });
                                        </script>
                                        <else/>
                                        <input name="{$vo['field']}[value]" type="text" class="form-control input-sm" class="{$vo['form_type']}" value="{$_GET[$vo['field']][value]}" rel="product">
                                    </if>
                                </if>
                            </li>
                        </ul>
                    </div>
                    <?php $max_key = $key1;?>
                </volist>
            </empty>
        </div>
        <div class="clearfix"></div>
        <input type="hidden" name="this_page" value="{$this_page}" />
        <div style="margin-left: 35px;margin-top:10px;"><a href="javascript:void(0);" style="display: -moz-stack;margin: 30px 0px 0px; font-size: 12px; color: rgb(62, 133, 233);" id="add_btn">+添加筛选条件</a>
        </div>
        <div class="resume-search-form" style="margin-left: 20px;margin-top: 10px;">
            <div  class="form-group" style="width: 100%;">
                <div class="col-md-2 control-label">行业：</div>
                <div class="col-md-9">
                    <input data-selector="industrys" class="text" type="text" placeholder="请选择行业" id="industrys" name="industry" data-ui="LocalDataUID" style="display: none;width:325px;height:40px;" rell="行业" value="{:I('industry')}" data-option="1"/>
                </div>
            </div>

            <div  class="form-group" style="width: 100%;margin-top: 10px;">
                <div class="col-md-2 control-label">职能：</div>
                <div class="col-md-9">
                    <input data-selector="jobtitles" class="text" type="text" placeholder="请选择职能" id="jobtitles" name="job_class" data-ui="LocalDataUID" style="display: none;width:325px;height:40px;"  data-option="1"  value="{:I('job_class')}"/>
                </div>
            </div>

            <div  class="form-group" style="width: 100%;margin-top: 10px;">
                <div class="col-md-2 control-label">所在城市：</div>
                <div class="col-md-9">
                    <input data-selector="dqs" data-option="1" class="text" type="text" placeholder="选择所属城市" id="dqs" name="location" data-ui="LocalDataUIB" style="display: none;width:440px;height:40px;border: 1px solid #d8e3ef;" value="{:I('location')}"  data-option="1" />
                </div>
            </div>

            <div  class="form-group" style="width: 100%;margin-top: 10px;">
                <div class="col-md-2 control-label">意向城市：</div>
                <div class="col-md-9">
                    <input data-selector="wantdqs"  class="text" type="text" placeholder="选择期望工作城市" id="wantdqs" name="intentCity" data-ui="LocalDataUIB" style="display: none;width:440px;height:40px;border: 1px solid #d8e3ef;"  data-option="1" value="{:I('intentCity')}" />
                </div>
            </div>
            <!--<div  class="form-group" style="margin-top: 10px;">-->
            <!--<div class="col-md-3 control-label" style="width: calc(25% + 15px)">意向城市：</div>-->
            <!--<div class="col-md-7">-->
            <!--<input data-selector="wantdqs" class="text" type="text" placeholder="选择期望工作城市" id="wantdqs" name="intentCity" data-ui="LocalDataUIB" style="display: none;width:440px;height:40px;margin-left: 15px;" />-->
            <!--</div>-->
            <!--</div>-->
        </div>
        <div class="pull-right" class="button_type" style="margin:20px;">
            <input type="hidden" name="m" value="product"/>
            <input type="hidden" name="act" id="act" value="output"/>
            <input type="hidden" name="daochu" id="daochu"/>
            <input type="hidden" name="current_page" id="current_page" value=""/>
            <input type="hidden" name="export_limit" id="export_limit" value=""/>
            <if condition="$Think.get.by neq null">
                <input type="hidden" name="by" value="{$Think.get.by}"/>
            </if>
        </div>
    </form>
</div>
<div class="" style="display:none;" id="dialog-import" title="导入数据">
    <div class="spiner-example">
        <div class="sk-spinner sk-spinner-three-bounce">
            <div class="sk-bounce1"></div>
            <div class="sk-bounce2"></div>
            <div class="sk-bounce3"></div>
        </div>
    </div>
</div>
<div class="" style="display:none;" id="dialog-role-info" title="{:L('EMPLOYEE_INFORMATION')}">
    <div class="spiner-example">
        <div class="sk-spinner sk-spinner-three-bounce">
            <div class="sk-bounce1"></div>
            <div class="sk-bounce2"></div>
            <div class="sk-bounce3"></div>
        </div>
    </div>
</div>
<script src="__PUBLIC__/js/images-loaded.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/js/litebox.min.js" type="text/javascript"></script>
<link href="__PUBLIC__/css/litebox.css" rel="stylesheet">
<script type="text/javascript">
    $(document).on("click",".closebtn",function (event) {
        var width=$("#right-sidebar-log").width();
        if($("#right-sidebar-log").css('right') == '0px'){
            $("#right-sidebar-log").animate({right:'-'+width+'px'}, 400);
        }
        $("#linetoggle").remove();
    })
    //日志详情弹出
    var timer;
    $(document).on('mouseenter','.right-sidebar-toggle-log',function(){
        var log_id = $(this).attr('rel');
        clearTimeout(timer);
        timer=setTimeout(function () {
            if($("#right-sidebar-log").css('right') != '0px'){
                $("#right-sidebar-log").animate({right:'0px'}, 600);
                $("#right-sidebar-log").css("width","60%");
            }
            $('#sidebar-container').load("/index.php?m=product&a=view1&id="+log_id);
            if($("#linetoggle").length>0){
                return
            }else{
                $('#sidebar-container').before("<div id='linetoggle'><div class='btn_ico'></div></div>");
            }
        },300);
    });

    $(".right-sidebar-toggle-log").on("mouseleave",function (){
        clearTimeout(timer);
    })
</script>

<script type="text/javascript">


    /*让复选框默认取消选择*/
    $(':checkbox').prop('checked', false);
    $(document).ready(function(){
        $('#knowledge-tree').jstree({
            'core' : {
                'check_callback' : true
            },
            'plugins' : [ 'types', 'dnd' ],
            'types' : {
                'default' : {
                    'icon' : '__PUBLIC__/img/kai.png'//fa fa-folder
                }

            }
        });
        //$('.jstree-children .fa-folder-open').css('color', '#FFC873');
        $('.jstree-anchor').click(function(){
            window.location.href = $(this).attr('href');
        });
        $("#edit_product").click(function(){
            window.location.href="{:U('product/edit', '&p='.$this_page.'&id=')}"+$(this).attr('rel');
        })

    });

    $(".controls_tr").mouseenter(function(){
        $(this).find(".controls").show();
    }).mouseleave(function(){
        $(this).find(".controls").hide();
    });
    var url = "{:U('background/getcurrentstatus')}";
    var limit_size = 1000;
    var count = '{$count}';

    /*var ii = 1;
     function remainTime(){
     if(ii == -1){
     ii = 1;
     }
     var id_array = new Array();
     $(".check_list:checked").each(function() {
     id_array.push($(this).val());
     });
     $("#daochu").val(id_array);
     $.get(url,function(data){
     if(data.data == 0){
     if (id_array != '') {
     count = id_array.length;
     }
     if((ii-1)*limit_size < count){
     $("#act").val('excel');
     $("#current_page").val(ii);
     $("#export_limit").val(limit_size);
     $("#searchForm").submit();
     setTimeout("remainTime()",1000);
     ii++;
     }else{
     swal("数据导出成功！","","success");
     //alert('导出完毕!');
     ii = 1;
     }
     }else{
     setTimeout("remainTime()",1000);
     }
     }, 'json');
     }*/
    //初始化图片查看插件
    $('.litebox').liteBox({
        revealSpeed: 400,
        background: 'rgba(0,0,0,.8)',
        overlayClose: true,
        escKey: true,
        navKey: true,
        errorMessage: '图片加载失败.'
    });

    if ("{:C('isMobile')}" == "1") {
        width = $('.container').width() * 0.9;
    } else {
        width = 800;
    }

    $("#dialog-role-info").dialog({
        autoOpen: false,
        modal: true,
        width: width,
        maxHeight: 550,
        position: ["center",100]
    });
    $("#dialog-import").dialog({
        autoOpen: false,
        modal: true,
        width: width,
        maxHeight: 400,
        position: ["center",100]
        // buttons: {
        // 	"确定": function () {
        // 		$('#excelimport_dialog').submit();
        // 		$(this).dialog("close");
        // 	},
        // 	"取消": function () {
        // 		$(this).dialog("close");
        // 	}
        // }
    });
    function changeContent(){
        a = $("#select1  option:selected").val();
        window.location.href="{:U('product/index', 'by=')}"+a;
    }
    /*添加筛选条件*/
    var m = {$max_key};
    $('#add_btn').click(function(){
        m += 1;
        $('#search_add').append('<div id="con_search_'+m+'" style="float:left;width:650px;padding-top:10px;margin:0px 10px 0 10px;"><div  id="rem_'+m+'" class="pull-left" style="line-height:30px;"><a href="javascript:void(0);" class="rem_search" rel="'+m+'" title="移除"><span class="fa fa-times-circle"></span></a></div>&nbsp;<ul class="nav pull-left" style="margin:0px 0 0 5px;width:620px"><li class="pull-left"><select id="field_'+m+'"  style="width:auto" class="form-control input-sm field_name new-select" onchange="changeCondition('+m+')" name=""><option class="" value="name">--请选择筛选条件--</option><volist name="field_list" id="v"><if condition = "$v['form_type'] eq 'p_box' && $v['field'] eq 'category_id'"><option class="product_category" value="{$v[field]}" rel="product" >{$v[name]}</option><else /><option class="{$v['form_type']}" value="{$v['field']}" rel="product" <if condition = "$vo['field'] eq $v['field']">selected="selected"</if>>{$v[name]}</option></if></volist><option class="role" value="owner_role_id">{:L('PRINCIPAL')}</option><option class="date" value="create_time">{:L('CREATION_TIME')}</option><option class="date" value="update_time">{:L('MODIFICATION_TIME')}</option></select>&nbsp;&nbsp;</li><li class="pull-left" id="conditionContent_'+m+'"><select id="condition_'+m+'" style="width:auto" class="form-control input-sm new-select" name="condition" onchange="changeSearch()"><option value="contains">{:L('INCLUDE')}</option><option value="not_contain">不包括</option><option value="is">{:L('YES')}</option><option value="isnot">{:L('ISNOT')}</option><option value="start_with">{:L('BEGINNING_CHARACTER')}</option><option value="end_with">{:L('TERMINATION_CHARACTER')}</option><option value="is_empty">{:L('Mandatory')}</option><option value="is_not_empty">不为空</option></select>&nbsp;&nbsp;</li><li class="pull-left" id="searchContent_'+m+'"><input id="search_'+m+'" type="text" style="width:160px;" class="input-medium form-control input-sm search-query" name="search"/>&nbsp;&nbsp;</li></ul></div>');
    });
    $(document).on('click','.rem_search',function(){
        var num = $(this).attr('rel');
        $('#con_search_'+num).remove();
    });

    // 筛选重复判断
    var dosearch = 1;
    function doh(){
        var ary = new Array();
        var field_name = '';
        var is_submit = 1;
        $('.field_name').each(function(k, v){
            field_name = $(this).find("option:selected").val();
            if(jQuery.inArray(field_name,ary) >= 0){
                is_submit = 0;
                swal({
                    title: "筛选条件中有重复项！",
                    text: data.info,
                    type: "error"
                });
                dosearch = 0;
                return false;
            }
            ary[k] = field_name;
        })
        if(is_submit == 1){
            $("#searchForm").submit();
        }
    }

    $("#dialog-field-search").dialog({
        autoOpen: false,
        modal: true,
        width: 750,
        height: 500,
        position: ["center",100],
        buttons: {
            "确定": function () {
                doh();
                if(dosearch == 1){
                    $(this).dialog("close");
                }
            },
            "取消": function () {
                $(this).dialog("close");
            }
        }
    });
    $("#search_type").click(function(){
        $("#dialog-field-search").dialog('open');
    });

    $(function(){
        $("#check_all").click(function(){
            $("input[class='check_list']").prop('checked', $(this).prop("checked"));
        });
        /* $('#delete').click(function(){
         swal({
         title: "确定要下架该人才吗？",
         type: "warning",
         showCancelButton: true,
         confirmButtonColor: "#DD6B55",
         confirmButtonText: "确定",
         closeOnConfirm: false
         },
         function(){
         $("#form1").attr('action', '{:U("product/delete")}');
         $("#form1").submit();
         });
         });*/


        $('#revert').click(function(){
            swal({
                    title: "确定要上架该人才吗？",
                    type: "warning",
                    showCancelButton: true,
                    confirmButtonColor: "#DD6B55",
                    confirmButtonText: "确定",
                    closeOnConfirm: false
                },
                function(){
                    $("#form1").attr('action', '{:U("product/revert")}');
                    $("#form1").submit();
                });
        });

        $(".excelExport").click(function(){
            if(count > limit_size){
                swal({
                        title: "导出量过大，将分几次导出是否继续?",
                        type: "warning",
                        showCancelButton: true,
                        confirmButtonColor: "#DD6B55",
                        confirmButtonText: "确定",
                        closeOnConfirm: false,
                        animation: "slide-from-top",
                        showLoaderOnConfirm: true
                    },
                    function(){
                        //remainTime();
                    });
            }else{
                var id_array = new Array();
                $(".check_list:checked").each(function() {
                    id_array.push($(this).val());
                });
                var ids = "";
                for(let i=0;i<id_array.length;i++){
                    ids = (ids==""?"":ids+",")+id_array[i];
                };
                var urlby = window.location.href;
                var by = urlby.split('by=');
                var dataId ={"idss":ids,"by":by[1]};
                if(id_array !=''){
                    swal({
                        title: "确定导出选中人才?",
                        text: "",
                        type: "warning",
                        showCancelButton: true,
                        confirmButtonText: "确定",
                        closeOnConfirm: false,
                        animation: "slide-from-top",
                        showLoaderOnConfirm: true
                    }, function(){
                        //remainTime();
                        /* $.ajax({
                         url:'{:U("background/output")}',
                         data:dataId,
                         type:'post',
                         success:function () {

                         },
                         error:function () {

                         },
                         dataType:'json'
                         })*/
                        $.get("/index.php?m=background&a=readyOutPut",dataId,function (data) {
                            swal("数据导出成功！","","success");
                        });
                        ids=encodeURIComponent(ids);
                        window.open('/index.php?m=background&a=readyOutPut&ids='+ids+"&by="+by[1]);
                    });
                }else{
                    swal({
                            title: "确定要导出全部吗？",
                            type: "warning",
                            showCancelButton: true,
                            confirmButtonColor: "#DD6B55",
                            confirmButtonText: "确定",
                            closeOnConfirm: false,
                            animation: "slide-from-top",
                            showLoaderOnConfirm: true
                        },
                        function(){
                            remainTime();
                        });
                }
            }
        })

        $("#dosearch").click(function(){
            result = checkSearchForm();
            if(result){
                $("#act").val('search');$("#searchForm").submit();
            }
        });

        $("#import_excel").click(function(){
            $('#dialog-import').dialog('open');
            $('#dialog-import').load('{:U("product/excelimport")}');
        });
        $(".role_info").click(function(){
            $role_id = $(this).attr('rel');
            $('#dialog-role-info').dialog('open');
            $('#dialog-role-info').load('{:U("user/dialoginfo","id=")}'+$role_id);
        });
    });

    //编辑人才状态效果
    $(function () {
        //点击效果
        $(".editstatus").click(function () {
            $(".status_ico").hide();
            $(this).next().show();
        })
        //点击确认按钮修改状态
        $(".status_btnedit").click(function () {
            var product_id=parseInt($(this).closest("tr").find(".check_list").val());
            var status=$(this).closest(".editable-controls").find("select option:selected").val();
            $.ajax({
                type: "post",
                url:"/index.php?m=product&a=editstatus&id="+product_id,
                data:{
                    product_id:product_id,
                    status:status
                },
                success:function (data) {
                    console.log(data);
                    swal("温馨提示！", "状态修改成功！", "success");
                    window.location=location;

                },
                error:function () {

                }
            })
        })
    })

    $(document).click(function(e){
        var _con = $('.editstatus,.editable-controls select');   // 设置目标区域
        if(!_con.is(e.target) && _con.has(e.target).length === 0){
            $(".status_ico").hide();
        };
    });


    $(".log_calllist").click(function(){
        $('#dialog-log').dialog('open');
        $('#dialog-log').load('{:U("log/resume_project","r=RCustomerLog&module=customer&id=")}'+$(this).attr('rel'));
        $.fn.modal.Constructor.prototype.enforceFocus = function() {};
    });




    $("#dialog-log").dialog({
        autoOpen: false,
        // modal: true,
        width: 750,
//    minHeight: 300,
        maxHeight: 500,
        position: ["center",100],
        buttons: {
            "确定": function () {

                $.ajax({
                    type:'post',
                    url: "{:U('Log/add_fine_project')}",
                    data:$('#dialog_form1').serialize(),
                    async: false,
                    success: function (data) {
                        if (data.status == 1) {
                            swal("操作成功！", "该人选成功加入项目！", "success");
                            $("#dialog-log").dialog("close");
                            // location.reload();
                        } else {
                            swal({
                                title: "操作失败！",
                                text:data.info,
                                type: "error"
                            });
                            return false;
                        }
                    },
                    dataType: 'json'
                });
            },
            "取消": function () {
                $(this).dialog("close");
            }
        },
        close: function() {
            $(this).html('');
        }
    });

    $(".select2").select2();
</script>
<include file="Public:footer" />


<div id="right-sidebar-log">
    <!--the css for jquery.mCustomScrollbar-->
    <link rel="stylesheet" href="__PUBLIC__/emoji/css/jquery.mCustomScrollbar.min.css"/>
    <!--the css for this plugin-->
    <link rel="stylesheet" href="__PUBLIC__/emoji/css/jquery.emoji.css"/>
    <!--(Optional) the js for jquery.mCustomScrollbar's addon-->
    <script src="__PUBLIC__/emoji/js/jquery.mousewheel-3.0.6.min.js"></script>
    <!--the js for jquery.mCustomScrollbar-->
    <script src="__PUBLIC__/emoji/js/jquery.mCustomScrollbar.min.js"></script>
    <!--the js for this plugin-->
    <script src="__PUBLIC__/emoji/js/jquery.emoji.js"></script>

    <div class="sidebar-container" id="sidebar-container">

    </div>
</div>
<style>
    .slimScrollDiv{
        overflow: inherit !important;
    }

    .sidebar-container ul.nav-tabs li a{
        background: #fff !important;
        color: #a7b1c2 !important;
        font-weight: 600 !important;
        padding: 14px 20px 14px !important;
        border-right: none !important;
    }
    .sidebar-container nav{
        display: none;
    }
    .sidebar-container #page-wrapper{
        margin-left: 0px;
    }
    #sidebar-container{
        box-shadow: rgb(187, 187, 187) -1px 10px 10px;
        border: 2px solid rgb(238, 238, 238);
    }

    #right-sidebar-log{
        width: 60%;
        right: -60%;
        background-color: #fff;
        position: fixed;
        top: 60px;
        z-index: 1009;
        bottom: 0;
        box-shadow: -5px -5px 1px #ccc;
    }

</style>
<script src="__PUBLIC__/resume_selector/common.21a64352.js"></script>
<script src="__PUBLIC__/resume_selector/resume.search.910ebde0.js "></script>